R has a very powerful drawing function, we can draw a variety of graphics with a few simple lines of code, but sometimes the default graphics settings do not meet our needs, and even encounter a variety of small problems: such as the axis or the
1.1 Column chart
Setwd ("E: // program files // rstudio // Temp") # Set the working directory install. packages ("rcolorbrewer") # If the Library (rcolorbrewer) is not installed # load the package citysales
1.2 Stacked column chart
R language Drawing function Daquan
One, Plot () function: Scatter plot
----#plot是用来画散点图的 ~ To the left is the dependent variable;
Plot (cars$dist~cars$speed), #y ~x
main= "Relationship between car distance & Speed", #表标题
Xlab = "Speed (miles per
Turn http://www.cnblogs.com/jiangmiaomiao/p/6991632.html0 IntroductionR supports 4 types of graphics: base graphics, grid graphics, lattice graphics, Ggplot2. Where the Base graphics is the default graphics system for R.1 Basic graphics Functions
1. Manage plotting
X11 (): Open a drawing window
? Device: view the list of available drawing devices
Dev. List (): Lists devices.
PDF (): Open a PDF file as a drawing device
Dev. cur (): displays the currently used device
Dev. Set (): change the
1 barplot (Data $ V2, names. Arg = data $ V1), too many names will cause incomplete display. You can add las = 2 to make names rotate for 90 degrees display
2 names is too long and not fully displayed. Use PAR (MAR = C (A, B, C, D) to change the
Variance analysis refers to the interaction of different variables, resulting in a change in results1. Single-Factor Variance analysis:Case: 50 patients were treated with cholesterol-lowering medications, of which three were treated with the same
Python, as a high-level programming language, is not known to be popular in circles since. Individual is also a fresh picture, keep up with the pace of the times to learn a bit. "Lu Xun" said: "Can not apply knowledge, is bullying." I used Python to
Basic drawing System• Drawing function (graphics package)- plot/hist(histogram)/boxplot(Box map)/Point (points)/lines(line)/text (add text)/Title/axis(add axis)-The calling function enables a graphics device and plots on the device • Basic drawing
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.